#include <algorithm>

using namespace std;
class Solution {
public:
	int get_sum(int num){
		
		int nSum=0;
		for(int i=1;i<num;++i){
			if(num%i==0){
				nSum+=i;
			}
		}
		return nSum;
	}
    bool checkPerfectNumber(int num) {
        
        return num==get_sum(num);
    }
};
